<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="render_box"></div>
    <script src="/xuni/bundle.js"></script>
    <script>
        let templateStr = `
            <ul class='list'>
                {{#arr}}
                    <li>我的名字：{{name}}</li>
                    <li>从事的工作：{{work}}</li>
                    <li>
                        <ol>
                            {{#hobby}}
                                <li>我的爱好:{{.}}</li>
                            {{/hobby}}
                        <ol>
                    </li>
                {{/arr}}
            </ul>
        `;
        let data = {
            arr:[{
                name:'懒猫',
                work:'前端',
                hobby:['爱好1','爱好2','爱好3']
            }],  
        }
        let domStr = SSG_TemplateEngine.render(templateStr,data);
        // 模板渲染
        let dom = document.getElementById('render_box');
        dom.innerHTML = domStr;
    </script>
</body>
</html>